package com.wyix.entity;

import java.util.List;

/**
 * @author wangdx
 * @since 2025/8/5
 */
public class Book {
    private String title;
    private String author;
    private List<String> categories;
    private double price;
    private int publishYear;

    public Book(String title, String author, List<String> categories, double price, int publishYear) {
        this.title = title;
        this.author = author;
        this.categories = categories;
        this.price = price;
        this.publishYear = publishYear;
    }

    // Getter方法
    public String getTitle() {
        return title;
    }

    public String getAuthor() {
        return author;
    }

    public List<String> getCategories() {
        return categories;
    }

    public double getPrice() {
        return price;
    }

    public int getPublishYear() {
        return publishYear;
    }

    @Override
    public String toString() {
        return "{书名='" + title + "', 作者='" + author + "', 价格=" + price + "}";
    }
}
